package com.leinbo.onedoc

import com.kotoframework.KotoApp
import com.kotoframework.KotoBasicJdbcApp.setDataSource
import com.kotoframework.SQLite
import com.leinbo.onedoc.utils.DbUtil.dataSource
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication

@SpringBootApplication(
    scanBasePackages = [
        "com.leinbo.onedoc.controller",
        "com.leinbo.onedoc.service",
        "com.leinbo.onedoc.config"
    ]
)
class OneDocApplication

fun main(args: Array<String>) {
    KotoApp
        .setDataSource(dataSource)
        .setDBType(SQLite)
        .setLog("logs")
        .setSoftDelete(false)
        .setDeleteTime(false)
        .setCreateTime(true)
        .setUpdateTime(true)
    runApplication<OneDocApplication>(*args)
}
